package com.xtaifghy.wugui;

import com.xtaifghy.wugui.ui.GamePanel;

import javax.swing.*;
import java.awt.*;

public class Main extends JFrame{
    public static void main(String[] args) {
        Main mainFrame = new Main();
    }

    public Main() throws HeadlessException {
        super("乌龟游戏");
        setSize(1000,600);
        setResizable(false);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        getContentPane().setBackground(new Color(0,112,26));
        init();
        this.setVisible(true);
    }

    public void init(){
        GamePanel gamePanel = new GamePanel(this);
        getContentPane().add(gamePanel);
        gamePanel.setBounds(0,0,780,550);
        gamePanel.setVisible(true);
    }

}
